package com.rxjava;

import rx.Observable;
import rx.functions.Action1;
import rx.functions.Func1;

/**
 * Created by kkmike999 on 16/4/12.
 */
public class flatMap {

	public static void main(String[] args) {
		String[] strArr = new String[]{"a", "b", "c"};

		Observable.from(strArr)
		          .map(new Func1<String, String>() {
			          @Override
			          public String call(String s) {
				          System.out.printf("map:" + s + "\n");
				          return s;
			          }
		          })
		          .subscribe(new Action1<String>() {
			          @Override
			          public void call(String s) {
				          System.out.printf("onNext: " + s + "\n");

				          // http

			          }
		          });
	}
}
